package cn.darkhorse.device.mapper;

import cn.darkhorse.device.pojo.MesCheckPlanDevice;
import cn.darkhorse.device.vo.MesCheckPlanDeviceVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 点检计划设备关联表 Mapper 接口
 * </p>
 *
 * @author maoguanjun
 * @since 2022-12-13
 */
public interface MesCheckPlanDeviceMapper extends BaseMapper<MesCheckPlanDevice> {
    /**
     * 根据名称查询用户id集合
     *
     * @param name
     * @return
     */
    List<Long> queryByName(@Param("name") String name);

    /**
     * 根据设备编码查询计划id
     *
     * @param deviceCode
     * @return
     */
    Long queryByCode(@Param("deviceCode") String deviceCode);

    List<MesCheckPlanDeviceVO> getList(@Param("planId")Long planId,
                                       @Param("deviceType")Long deviceType,
                                       @Param("deptId")Long deptId,
                                       @Param("deviceName")String deviceName,
                                       @Param("checkCycles")List<Integer> checkCycles,
                                       @Param("auditStatus")Integer auditStatus);
}
